package router

import (
	"github.com/gin-gonic/gin"
	"server/api/v1"
	//"server/middleware"
)
func InitAuthorityRouter(Router *gin.RouterGroup)(R gin.IRoutes){
	AuthorityRouter := Router.Group("authority")//.Use(middleware.OperationRecord())
	{
		AuthorityRouter.POST("setDataAuthority", v1.SetDataAuthority) // 设置角色资源权限
		AuthorityRouter.POST("getPolicyPathByAuthorityId", v1.GetPolicyPathByAuthorityId) //
		AuthorityRouter.POST("createAuthority", v1.CreateAuthority) // 创建角色
		AuthorityRouter.POST("UpdateCasbin", v1.UpdateCasbin)
		AuthorityRouter.POST("getAuthorityList", v1.GetAuthorityList) // 获取角色列表
	}
	return AuthorityRouter
}